package com.java.learning.cha1;

import java.io.BufferedReader;
import java.io.FileReader;

public class ReaderDemo {
    public static void main(String[] args) {
        BufferedReader br = null;
        try {
            br = new BufferedReader(new FileReader("D:\\mytest.txt"));
            String result = null;
            while ((result = br.readLine()) != null) {
                System.out.println(result);
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                br.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
